package com.xc.service.Impl;

import com.xc.dao.RoleMapper;
import com.xc.pojo.Role;
import com.xc.service.RoleService;
import com.xc.vo.RoleVo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class RoleServiceImpl implements RoleService {

    @Resource
    private RoleMapper roleMapper;
    /**
     * 查询角色列表
     * @param roleVo
     * @return
     */
    public List<Role> queryRoleList(RoleVo roleVo) {
        return roleMapper.queryRoleList(roleVo);
    }

    public int addRole(Role role) {
        return roleMapper.addRole(role);
    }

    public int updateRole(Role role) {
        return roleMapper.updateRole(role);
    }

    public int deleteRole(Integer id) {
        return roleMapper.deleteRole(id);
    }
}
